package com.leetcode.algorithm.y22.m06;

/**
 * LCP 01. 猜数字
 * 
 * https://leetcode.cn/problems/guess-numbers/
 * 
 * @author jie.deng
 *
 */
class QuestionLcp01Solution01 {
	
	public int game(int[] guess, int[] answer) {
		int cnt = 0;
		for (int i = 0; i < answer.length; i++) {
			cnt += (guess[i] == answer[i] ? 1 : 0);
		}
		return cnt;
	}
    
}